Skip to content

Conversation

@shairyar
Copy link
Member

@shairyar shairyar commented Sep 8, 2025

Problem

When users encounter a 401 Unauthorized error while sending metrics to AppSignal, the current error handling doesn't provide helpful guidance about what went wrong or how to fix it.

Solution

This PR enhances the error logging in the send_batch function to provide a specific, actionable message when encountering a 401 error. It guides users to ensure they're using an app-level API key rather than an organization-level key.

@shairyar shairyar self-assigned this Sep 8, 2025
@shairyar shairyar added the enhancement An improvement to an existing feature. label Sep 8, 2025
@backlog-helper
Copy link

backlog-helper bot commented Sep 8, 2025

✔️ All good!

New issue guide | Backlog management | Rules | Feedback

@shairyar shairyar force-pushed the fix-401-error-message branch from f1de5ee to 0a94e50 Compare September 8, 2025 09:57
@shairyar shairyar requested a review from unflxw September 8, 2025 10:02
Copy link
Contributor

@unflxw unflxw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @shairyar! There's a couple things that need fixing, but the gist of it is good.

shairyar and others added 3 commits September 9, 2025 15:34
- Use is_success() method for proper HTTP status classification
- Display human-readable status codes (e.g., '401 Unauthorized')
The changeset aims to be descriptive of the functionality.

Co-authored-by: Noemi <[email protected]>
- Simplify log formatting to use status Display trait directly
@shairyar shairyar requested a review from unflxw September 9, 2025 12:02
@unflxw unflxw merged commit 81363db into main Sep 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An improvement to an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants